1. Field of the Invention
This invention relates to data processing systems; and more specifically to a method of controlling the transferring of data between a peripheral device and a peripheral controller in a data processing system.
2. Description of the Prior Art
Current data processing systems have a wide variety of peripheral devices which are used to input, output and store information processed by the system. These peripheral devices include CRT terminals, card readers, magnetic tape units and various types of disk devices. Among the disk peripheral devices, there are various types including those which have rigid platters, and those which have flexible platters on which the information is recorded. Among the rigid disk devices there exists several types--those which permit the recording media to be removed from the drive unit and those which have a non-removable recording media. A disk device may contain both a removable and a non-removable recording media. A recent development in the rigid disk device category includes a non-removable cartridge in which the recording surface is enclosed and some of these devices are known as Winchester type disks. The flexible disks are also known as floppy disks and are usually removable from the disk drive itself. These disk drives are usually interfaced to the data processing system via means of a peripheral controller which contains the logic which controls the reading and writing of information from or to the recording media.
Information is recorded on a disk in units of data known as sectors. Depending upon the exact format used to record the data, usually more than one sector is recorded in a given track of the disk. The beginning and ending of the track is usually determined by a track index mark which is a notch on the edge of the disk. Therefore, logic is usually provided such that upon the detection of the track index mark, the sector to be read will be located by reading the information on the track until the proper sector is found. Once the proper sector is located, the information to be transferred will either be written onto the disk or read from the disk in the located sector.
Although most disks have used this index mark to indicate the beginning of a track, there is a wide variety of formats used for recording data on disk devices. These various methods of recording data on disk devices can be classified as to whether they are hard sectored or soft sectored.
A disk device is referred to as being a hard sectored device if the information is recorded in physically defined blocks of data, referred to as sectors, on the recording media. For example, in a hard sectored disk, the disk may contain a series of holes which are detected by the disk drive and one sector of information is recorded between a starting and ending sector hole. Therefore, in a hard sector disk there is a sector hole which defines the beginning of each sector such that a single sector may consist of an identification (ID) field and a data field contained in the sector between two sector holes.
In a soft sectored disk format there is usually an ID field delineated by a unique address mark for each sector on the disk. The address mark is actually detected by the hardware by violating the coding rules for encoding the information that is written on the disk. For example, if the information is recorded on the disk using a modified frequency modulation (MFM) technique, the address mark will be recorded on the disk in violation of the MFM recording rules such that the violation will be detected by the hardware. In disks which are soft sectored, the identification field which is preceeded by an address mark is usually followed by a data field which is also preceeded by an address mark. This results in an address (ID) field and a data field associated with each soft sector. Using this soft sectored format, it is possible to have any number of sectors per track since there is no hardware mark on the disk to indicate the beginning of a sector. This soft sectored format permits many sectors having short data fields or a few sectors having long data fields to be recorded within a given track. Using the soft sectored format, the identification field usually contains information which uniquely identifies the sector by recording a sector number within the ID field. Therefore, using the soft sectored format, the peripheral disk controller must be able to read the ID field and detect when the sector of interest is being read as determined by the ID field which is recorded within the sector. This is to be contrasted with the hard sector format in which the number of sector holes past the index mark can be used to determine which sector is currently being accessed.
Before a disk can be used to perform normal reads and writes of user data, the disk must usually be initialized by a formatting operation which lays down on the disk the initial values of the identification fields, data fields and gaps between fields or sectors. This is particularly the case for soft sectored disks which require that the identification fields and data fields be initialized so that a normal read or write operation can locate the specified sector. One technique for formatting soft sectored disks is to write the complete track at one time initializing all sectors within that track in one revolution of the disk. This technique can require that sufficient memory to contain one complete track's worth of information be available so that the memory can be initialized with the information required to write one complete track. Once the memory is initialized, a block transfer write to the disk is initiated upon the detection of the track index mark. This transfers consecutive words, often containing a repetitive data pattern, from the memory to the disk until the complete track has been written out from the beginning of the detection of the track index mark until its second occurrence as the disk revolves. Unfortunately, this technique requires a memory sufficiently large to hold multiple sectors of information and results in a memory which is under utilized because, in the performance of normal read or write operations, a single sector disk read or write can be done using a much smaller memory containing a single sector of information.
Another problem which is often encountered in disk controllers is the requirement that a single disk controller handle a wide variety of disk devices. For example, a controller may be required to be able to read or write from a Winchester type disk and also be required to read or write from a floppy disk. In addition, there may be a variety of densities which can be used to record the information on the disk media. For example, it is now common to have both single and double density floppy disks within a single system and the format used to record the information on a single density floppy disk may vary from that of a double density floppy disk and will be different from that of a Winchester type disk. The requirement that a single controller handle this wide variety of disk formats can require that very complex logic be provided to handle the various counting operations which are required to detect the beginning and end of various ID, data and gap fields that are recorded on the disk. Therefore, what is required is a technique which will allow a single disk controller to be used with a wide variety of formats. This same technique can be used to perform the various formatting read and write operations found even within a single disk format.